// 封装接口

import request from '@/utils/request'

// 新增部门
export const addDepartments = (data) => {
  return request.post('/company/department', data)
}

// 查询企业的部门列表
export const getDepartments = () => {
  return request.get('/company/department')
}

// 根据ID修改部门详情
export const putDepartments = (data) => {
  return request.put(`/company/department/${data.id}`, data)
}

// 根据ID删除部门
export const delDepartments = (id) => {
  return request.delete(`/company/department/${id}`)
}

// 根据ID查询部门详情
export const getDepartmentsId = (id) => {
  return request.get(`/company/department/${id}`)
}
